Fix unit tests that fail due to jenkins CSS changes#184
Fix unit tests that fail due to jenkins CSS changes#184jmMeessen merged 2 commits intojenkinsci:masterfrom
Conversation
| <dependency> | ||
| <groupId>com.google.errorprone</groupId> | ||
| <artifactId>error_prone_annotations</artifactId> | ||
| <version>2.10.0</version> | ||
| </dependency> |
There was a problem hiding this comment.
was excluded for script-security do we need to version manage this or should it be excluded if coming from core via guava?
|
|
||
| HtmlPage configFiles = wc.goTo("configfiles"); | ||
| HtmlAnchor removeAnchor = configFiles.getDocumentElement().getFirstByXPath("//a[contains(@onclick, 'removeConfig?id=" + CONFIG_ID + "')]"); | ||
| HtmlAnchor removeAnchor = configFiles.getDocumentElement().getFirstByXPath("//a[contains(@data-url, 'removeConfig?id=" + CONFIG_ID + "')]"); |
There was a problem hiding this comment.
HtmlAnchor removeAnchor = configFiles.getDocumentElement().getFirstByXPath("//a[contains(@data-url, 'removeConfig?id=" + CONFIG_ID + "')|contains(@onclick, 'removeConfig?id=" + CONFIG_ID + "')]");should (if I got my XPath correct) have allowed to fix a PCT issue without bumping the core to a non LTS making upgrades for LTS users harder.
There was a problem hiding this comment.
basically, your saying to make this test backwards compatible with older jenkins?
There was a problem hiding this comment.
I am saying you could have done that to make it backwards compatible with older Jenkins versions. As it is a test only issue and the plugin will work after an upgrade of Jenkins, the current way is not making it any harder for users (there would be no broken plugins post upgrade) so it is fine as is. (hence my approval)
|
@mikecirioli starting from your PR, I have created the PR #199 where I merged master and updated some dependencies because the build was failing due to Maven enforcer rule, so this PR becomes obsolete. |
|
Suggest closing in favor of #200. |
HTML element attribute id names have changed in newer versions of Jenkins (2.33x.x), causing a few unit tests to break. This PR updates and fixes them.